Learn R Programming

Directional (version 3.7)

Density of the von Mises distribution: Density of the von Mises distribution

Description

Density of the von Mises distribution.

Usage

vm.density(x, k, m, rads = FALSE, logden = FALSE)

Arguments

x

A vector with circular data.

k

The concentration parameter.

m

The mean value.

rads

If the data are in rads, then this should be TRUE, otherwise FALSE.

logden

If you the logarithm of the density values set this to TRUE.

Value

A vector with the density values of x.

Details

The density of the von Mises distribution is computed.

References

Mardia, K. V. and Jupp, P. E. (2000). Directional statistics. Chicester: John Wiley & Sons.

See Also

kent.density, rvonmises, ESAGdensity

Examples

Run this code
# NOT RUN {
x <- rvonmises(500, m = 2.5, k = 10, rads = TRUE)
mod <- circ.summary(x, rads = TRUE, plot = FALSE)
den <- vm.density(x, mod$kappa, mod$mesos, rads = TRUE, logden = TRUE )
mod$loglik
sum(den)
# }

Run the code above in your browser using DataLab